#带linux基础命令，缺少的可以使用yum安装
FROM openjdk:8-jdk-oraclelinux7

ENV PARAMS="--spring.profiles.active=test"
RUN /bin/cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' >/etc/timezone

COPY ./target/xm-deliver-1.0.0-xm.tar.gz /xm/

WORKDIR /xm

RUN tar zxvf xm-deliver-1.0.0-xm.tar.gz && rm -rf xm-deliver-1.0.0-xm.tar.gz

#8080web 8905actuator 8602grpc
EXPOSE 8080 8905 8602

ENTRYPOINT ["/bin/sh","-c","java -Dfile.encoding=utf8 -Djava.security.egd=file:/dev/./urandom -Dloader.path=/xm/lib -jar /xm/xm-deliver-1.0.0.jar ${PARAMS}"]
